//
//  ScratchEvents.h
//  EsotericDemo
//
//  Created by Temp Admin on 6/11/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ScratchMessage.h"

@protocol ScratchCore <NSObject>
-(void) Send:(ScratchMessage *) message;
-(void) Close;
@end

@interface ScratchEvents : NSObject
{
	@private
	id<ScratchCore> core;
	bool initialized;
}

-(void) setCore:(id<ScratchCore>) newCore;
-(void) send:(ScratchMessage *) message;
-(void) close;
-(void) newConnection;
-(void) connectionLost;
-(void) messageReceived:(ScratchMessage *) message;

@end
